<% content_for :sidebar do %>
  <%= sidebar_button_link "Edit #{@item_type.name.singularize} Type",
           edit_item_type_path(@item_type) if can? :edit, @item_type %>
  <%= sidebar_button_link "New #{@item_type.name.singularize}",
           new_item_type_item_path(@item_type) if can? :create, Item %>
<% end %>

<h3><%= link_to @item_type.item_category,
                item_category_path(@item_type.item_category) %> >
<%= @item_type.name %></h3>

<p><%= @item_type.description %></p>

<%= render(partial: 'items/items_table',
           locals: { items: @item_type.items}) %>
<%= image_tag @item_type.item_type_image.url if @item_type.item_type_image.present? %>

<p>
 Created <%= @item_type.created_at %><br/>
 Last Modified <%= @item_type.updated_at %><br/>
 Last Editor <%= @last_editor %>
</p>
